﻿<%@ Page Language="VB" MasterPageFile="~/masterpages/MaestraConsulta.master" AutoEventWireup="false" CodeFile="ConCrias.aspx.vb" Inherits="Consulta_ConCrias" title="Untitled Page" %>

<%@ Register    Assembly="AjaxControlToolkit"
                Namespace="AjaxControlToolkit"
                TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type ="text/css">
        .FormTABLE {}
        .FormHeaderTD {background-color: #3299CC; color: #FFFFFF; text-align: Center; padding: 3}
        .FormHeaderFONT {font-size: 10pt; color: #FFFFFF; font-weight: bold; font-family: Verdana, Arial, Helvetica, Tahoma}
        .FieldCaptionTD {background-color: #DEDFDF; padding: 3; font-weight:800}
        .FieldCaptionFONT {font-size: 10pt; font-family: Verdana, Helvetica, Arial, Tahoma}
        .DataTD {background-color: #F7F7F7}
        .RecordSeparatorTD {background-color: #F7F7F7}
        .DataFONT {font-size: 8pt; font-family: Verdana, Helvetica, Arial, Tahoma; text-decoration:none}
        .ColumnFONT {font-size: 8pt; color: #FFFFFF; font-weight: bold; font-family: Verdana, Helvetica, Arial, Tahoma}
        .ColumnTD {background-color: #2F2F4F; color: #FFFFFF; padding: 3}
        .CommentFont{ font-size:7pt; font-family:Verdana, Helvetica, Arial, Tahoma;color:#666666}
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

    <ajaxToolkit:ToolkitScriptManager runat="Server" EnablePartialRendering="true" ID="ScriptManager1" />

    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="MyUpdatePanel">
        <ProgressTemplate>
            <div style=" width:100%; background: #FFFFFF; height:60px; vertical-align: middle; display: block; border: thin;" 
                align="center">
                <table width="100%" style=" height:100%">
                    <tr>
                        <td> Actualizando <img src="../images/ajax-loader.gif" alt="actualizando" /></td>
                    </tr>
                </table>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>


    <asp:UpdatePanel ID="MyUpdatePanel" runat="server">
    <ContentTemplate>

    <div align="center">
        <table class="FormTABLE">
            <tr>
                <td colspan="6" class="FormHeaderTD">BUSCAR</td>
            </tr>
            <tr>
                <td class="DataTD">&nbsp;Animal:&nbsp; </td>
                <td class="DataTD">
                    <asp:TextBox ID="txtAnimal" runat="server" BorderWidth="1px" MaxLength="8" 
                        Width="80px" AutoPostBack="True" TabIndex="1"></asp:TextBox></td>
                <td class="DataTD">&nbsp;Padre:&nbsp; </td>
                <td class="DataTD">
                    <asp:TextBox ID="txtPadre" runat="server" BorderWidth="1px" MaxLength="8" 
                        Width="80px" AutoPostBack="True"></asp:TextBox> </td>
               
                <td class="DataTD">&nbsp;Madre:&nbsp;</td>
                <td class="DataTD">
                    <asp:TextBox ID="txtMadre" runat="server" BorderWidth="1px" MaxLength="8" 
                        Width="80px" AutoPostBack="True"></asp:TextBox></td>
            </tr>
        </table>
    </div>

    <br />
    <div align="center">
        <asp:GridView ID="gvAnimales" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" 
            BorderStyle="None" BorderWidth="1px" CellPadding="3" 
            PageSize="100" ToolTip="Vista predeterminada" CellSpacing="2" 
            RowStyle-HorizontalAlign="Left">
            <PagerSettings PageButtonCount="20" Position="TopAndBottom" 
                Mode="NumericFirstLast" />
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
            <Columns>
                <asp:BoundField DataField="Sexo" HeaderText="SX" />
                <asp:HyperLinkField DataNavigateUrlFields="animalid,sexo" 
                    DataNavigateUrlFormatString="crias.aspx?animal={0}&amp;sexo={1}" 
                    DataTextField="cveAnimal" HeaderText="Animal" Target="_self" />
                <asp:BoundField DataField="cveAnimal" HeaderText="Animal" Visible="false"/>
                <asp:BoundField DataField="nombre" HeaderText="Nombre" />
                <asp:BoundField DataField="padre" HeaderText="Padre" Visible="false"/>
                <asp:HyperLinkField DataNavigateUrlFields="id_padre" 
                    DataNavigateUrlFormatString="crias.aspx?animal={0}&amp;sexo=T" 
                    DataTextField="padre" HeaderText="Padre" Target="_self" />
                <asp:BoundField DataField="madre" HeaderText="Madre" Visible="false" />
                <asp:HyperLinkField DataNavigateUrlFields="id_madre" 
                    DataNavigateUrlFormatString="crias.aspx?animal={0}&amp;sexo=V" 
                    DataTextField="madre" HeaderText="Madre" Target="_self" />
                <asp:BoundField DataField="estatus" HeaderText="ST" />
                <asp:BoundField DataField="fechabaja" DataFormatString="{0:d}" 
                    HeaderText="Baja" />
            </Columns>
            <FooterStyle BackColor="#CCCCCC" ForeColor="White" Font-Bold="true" />
            <PagerStyle BackColor="#FFFFFF" ForeColor="#000000" HorizontalAlign="Center" Font-Bold="true"/>
            <EmptyDataTemplate>
                No existen registros con la condición dada
            </EmptyDataTemplate>
            
            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#2F2F4F" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="#DCDCDC" />
        </asp:GridView>
    </div>


    </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>
